import 'package:flutter/material.dart';

// 做题主题切换
class ExamTopicModel with ChangeNotifier {
  // 0默认主题为亮色；1为暗色主题
  int et;
  
  ExamTopicModel({
    this.et
  });

  void switchExamTopic() {
    if(this.et == 0) {
      this.et = 1;
    }else{
      this.et = 0;
    }
    notifyListeners();
  }
}

// 顺序做题信息
class SubLenModel with ChangeNotifier {
  int sub1Len;        // 科目一题目数量
  int sub4Len;        // 科目四题目数量
  int curSubIndex;    // 科目一当前题目
  int rightNum;
  int errorNum;

  SubLenModel({
    this.sub1Len,
    this.sub4Len,
    this.curSubIndex,
    this.rightNum,
    this.errorNum
  });

  void setSub1Len(len) {
    this.sub1Len = len;
    notifyListeners();
  }

  void setCurSubIndex(index) {
    this.curSubIndex = index;
    notifyListeners();
  }

  void increaseRightNum() {
    this.rightNum += 1;
    notifyListeners();
  }

  void increaseErrNum() {
    this.errorNum += 1;
    notifyListeners();
  }
}
